import axios from "axios";

export const prefix='api'
export const state='mock';
axios.interceptors.request.use(function (config) {
   let token= window.sessionStorage.getItem('token')!==undefined ?window.sessionStorage.getItem('token') : window.localStorage.getItem('token')
    config.headers.token=token
    return config;
})
//返回格式


axios.interceptors.response.use(function (res) {
//   console.log(res)
    return res.data;
})
